package com.greyu.ysj.service.impl;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.greyu.ysj.entity.CbtConstant;
import com.greyu.ysj.entity.User;
import com.greyu.ysj.entity.CbtConstantExample;
import com.greyu.ysj.mapper.CbtConstantMapper;
import com.greyu.ysj.service.CbtConstantService;

@Service
public class CbtConstantServiceImpl implements CbtConstantService {
	
	@Autowired
	private CbtConstantMapper cbtConstantMapper;
	@Override
	public CbtConstant selectConstantById(Integer id) {
		
		CbtConstantExample cbtConstantExample = new CbtConstantExample();
        CbtConstantExample.Criteria criteria = cbtConstantExample.createCriteria();
        criteria.andIdEqualTo(id);
        List<CbtConstant> list = this.cbtConstantMapper.selectByExample(cbtConstantExample);

        CbtConstant cbtConstant;
        try {
        	cbtConstant = list.get(0);
        } catch (Exception e) {
            return null;
        }
        return cbtConstant;
    }
}
